@section('content')
<div class="am-g m-user">
	<div class="am-u-md-12">
		<div class="m-user-title am-cf">
			<h1>我的账户</h1>
			<!-- 
			<span class="free-tip">订单满500元免运费</span>
			 -->
		</div>
	</div>
	<div class="am-u-md-12">
		<div class="m-user-hd">
			<ul class="am-cf">
				<li><a href="{{URL::to('user/order-list')}}">我的订单</a></li>
				<li><a href="{{URL::to('user/address-list')}}">地址</a></li>
				<li><a href="{{URL::to('user/info')}}">登陆资料</a></li>
				<li><a href="{{URL::to('user/favorite-list')}}">收藏夹</a></li>
			</ul>
		</div>
		<div class="m-user-bd">
			<ul>
				<li>
					<h3>我的订单</h3>
					<span>查看您的订单状态</span>
				</li>
			</ul>
			
			<table class="am-table m-table">
			    <thead>
			        <tr>
			            <th>时间</th>
			            <th>订单号</th>
			            <th>状态</th>
			            <th>金额</th>
			            <th>操作</th>
			        </tr>
			    </thead>
			    <tbody>
			    	@foreach($orders as $order)
			    	<tr>
			            <td>{{date('y-m-d',strtotime($order->created_at))}}</td>
			            <td>{{$order->id}}</td>
			            <td>
			            	@if($order->status == 0)
			            		未支付
			            	@elseif ($order->status == 1)
			            		已支付
			            	@elseif ($order->status == 2)
			            		已发货
			            	@elseif ($order->status == 3)
			            		已退货
			            	@else
			            		已关闭
			            	@endif
			            	@if(!empty($order->express_id))
			            	  <br><span>{{$order->express_name}} : {{$order->express_id}}</span>
			            	@endif
			            </td>
			            <td>¥{{$order->product_total_price + $order->freight}}</td>
			            <td>
			            @if($order->status == 0)
			            <a href="{{URL::to('order/pay',$order->id)}}">立即支付</a>
			            @else
			            <a href="{{URL::to('user/order',$order->id)}}">查看详情</a>
			            @endif
			            </td>
			        </tr>
			    	@endforeach
			    </tbody>
			</table>
			
			<div class="am-fr">
			  	<!-- 分页列表 -->
			  	{{$orders->links("admin.slider")}}
			 </div>
		</div>
	</div>
    </div>
</div>

@stop
<script type="text/javascript">

</script>
@stop
